Integrand size = 21, antiderivative size = 68 \[ \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx=3 a b^2 x-\frac {3 a^2 b \text {arctanh}(\cos (e+f x))}{f}+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f} \]
3*a*b^2*x-3*a^2*b*arctanh(cos(f*x+e))/f+b*(a^2-b^2)*cos(f*x+e)/f-a^2*cot(f *x+e)*(a+b*sin(f*x+e))/f
Time = 1.06 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.28 \[ \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {-2 b^3 \cos (e+f x)-a^3 \cot \left (\frac {1}{2} (e+f x)\right )+6 a b \left (b (e+f x)-a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )+a^3 \tan \left (\frac {1}{2} (e+f x)\right )}{2 f} \]
(-2*b^3*Cos[e + f*x] - a^3*Cot[(e + f*x)/2] + 6*a*b*(b*(e + f*x) - a*Log[C os[(e + f*x)/2]] + a*Log[Sin[(e + f*x)/2]]) + a^3*Tan[(e + f*x)/2])/(2*f)
Time = 0.50 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.03, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 3271, 3042, 3502, 27, 3042, 3214, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \sin (e+f x))^3}{\sin (e+f x)^2}dx\) |
\(\Big \downarrow \) 3271 |
\(\displaystyle \int \csc (e+f x) \left (3 b a^2+3 b^2 \sin (e+f x) a-b \left (a^2-b^2\right ) \sin ^2(e+f x)\right )dx-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {3 b a^2+3 b^2 \sin (e+f x) a-b \left (a^2-b^2\right ) \sin (e+f x)^2}{\sin (e+f x)}dx-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \int 3 \csc (e+f x) \left (b a^2+b^2 \sin (e+f x) a\right )dx+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle 3 \int \csc (e+f x) \left (b a^2+b^2 \sin (e+f x) a\right )dx+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 3 \int \frac {b a^2+b^2 \sin (e+f x) a}{\sin (e+f x)}dx+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle 3 \left (a^2 b \int \csc (e+f x)dx+a b^2 x\right )+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 3 \left (a^2 b \int \csc (e+f x)dx+a b^2 x\right )+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle 3 \left (a b^2 x-\frac {a^2 b \text {arctanh}(\cos (e+f x))}{f}\right )+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\) |
3*(a*b^2*x - (a^2*b*ArcTanh[Cos[e + f*x]])/f) + (b*(a^2 - b^2)*Cos[e + f*x ])/f - (a^2*Cot[e + f*x]*(a + b*Sin[e + f*x]))/f
3.2.71.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-(b^2*c^2 - 2*a*b*c*d + a^2*d^2))*Co s[e + f*x]*(a + b*Sin[e + f*x])^(m - 2)*((c + d*Sin[e + f*x])^(n + 1)/(d*f* (n + 1)*(c^2 - d^2))), x] + Simp[1/(d*(n + 1)*(c^2 - d^2)) Int[(a + b*Sin [e + f*x])^(m - 3)*(c + d*Sin[e + f*x])^(n + 1)*Simp[b*(m - 2)*(b*c - a*d)^ 2 + a*d*(n + 1)*(c*(a^2 + b^2) - 2*a*b*d) + (b*(n + 1)*(a*b*c^2 + c*d*(a^2 + b^2) - 3*a*b*d^2) - a*(n + 2)*(b*c - a*d)^2)*Sin[e + f*x] + b*(b^2*(c^2 - d^2) - m*(b*c - a*d)^2 + d*n*(2*a*b*c - d*(a^2 + b^2)))*Sin[e + f*x]^2, x] , x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 2] && LtQ[n, -1] && (IntegerQ[m] || IntegersQ[2*m, 2*n])
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 1.13 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.90
method | result | size |
derivativedivides | \(\frac {-a^{3} \cot \left (f x +e \right )+3 a^{2} b \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )+3 a \,b^{2} \left (f x +e \right )-\cos \left (f x +e \right ) b^{3}}{f}\) | \(61\) |
default | \(\frac {-a^{3} \cot \left (f x +e \right )+3 a^{2} b \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )+3 a \,b^{2} \left (f x +e \right )-\cos \left (f x +e \right ) b^{3}}{f}\) | \(61\) |
parallelrisch | \(\frac {6 a \,b^{2} f x +2 b^{3}+6 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) a^{2} b +\sec \left (\frac {f x}{2}+\frac {e}{2}\right ) \csc \left (\frac {f x}{2}+\frac {e}{2}\right ) a^{3}-2 \cot \left (\frac {f x}{2}+\frac {e}{2}\right ) a^{3}-2 \cos \left (f x +e \right ) b^{3}}{2 f}\) | \(83\) |
risch | \(3 a \,b^{2} x -\frac {b^{3} {\mathrm e}^{i \left (f x +e \right )}}{2 f}-\frac {b^{3} {\mathrm e}^{-i \left (f x +e \right )}}{2 f}-\frac {2 i a^{3}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}+\frac {3 a^{2} b \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f}-\frac {3 a^{2} b \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f}\) | \(107\) |
norman | \(\frac {\frac {a^{3} \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {2 b^{3} \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {2 b^{3} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {4 b^{3} \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {a^{3}}{2 f}-\frac {a^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {a^{3} \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}+3 a \,b^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+9 a \,b^{2} x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+9 a \,b^{2} x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+3 a \,b^{2} x \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{3}}+\frac {3 a^{2} b \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}\) | \(240\) |
Time = 0.30 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.46 \[ \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx=-\frac {3 \, a^{2} b \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 3 \, a^{2} b \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) + 2 \, a^{3} \cos \left (f x + e\right ) - 2 \, {\left (3 \, a b^{2} f x - b^{3} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, f \sin \left (f x + e\right )} \]
-1/2*(3*a^2*b*log(1/2*cos(f*x + e) + 1/2)*sin(f*x + e) - 3*a^2*b*log(-1/2* cos(f*x + e) + 1/2)*sin(f*x + e) + 2*a^3*cos(f*x + e) - 2*(3*a*b^2*f*x - b ^3*cos(f*x + e))*sin(f*x + e))/(f*sin(f*x + e))
\[ \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx=\int \left (a + b \sin {\left (e + f x \right )}\right )^{3} \csc ^{2}{\left (e + f x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.00 \[ \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {6 \, {\left (f x + e\right )} a b^{2} - 3 \, a^{2} b {\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 2 \, b^{3} \cos \left (f x + e\right ) - \frac {2 \, a^{3}}{\tan \left (f x + e\right )}}{2 \, f} \]
1/2*(6*(f*x + e)*a*b^2 - 3*a^2*b*(log(cos(f*x + e) + 1) - log(cos(f*x + e) - 1)) - 2*b^3*cos(f*x + e) - 2*a^3/tan(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 137 vs. \(2 (68) = 136\).
Time = 0.33 (sec) , antiderivative size = 137, normalized size of antiderivative = 2.01 \[ \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {6 \, {\left (f x + e\right )} a b^{2} + 6 \, a^{2} b \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) + a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \frac {2 \, a^{2} b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, a^{2} b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 4 \, b^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + a^{3}}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}}{2 \, f} \]
1/2*(6*(f*x + e)*a*b^2 + 6*a^2*b*log(abs(tan(1/2*f*x + 1/2*e))) + a^3*tan( 1/2*f*x + 1/2*e) - (2*a^2*b*tan(1/2*f*x + 1/2*e)^3 + a^3*tan(1/2*f*x + 1/2 *e)^2 + 2*a^2*b*tan(1/2*f*x + 1/2*e) + 4*b^3*tan(1/2*f*x + 1/2*e) + a^3)/( tan(1/2*f*x + 1/2*e)^3 + tan(1/2*f*x + 1/2*e)))/f
Time = 6.55 (sec) , antiderivative size = 194, normalized size of antiderivative = 2.85 \[ \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {a^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{2\,f}-\frac {a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a^3+4\,b^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}+\frac {6\,a\,b^2\,\mathrm {atan}\left (\frac {36\,a^2\,b^4}{36\,a^3\,b^3-36\,a^2\,b^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}+\frac {36\,a^3\,b^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{36\,a^3\,b^3-36\,a^2\,b^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f}+\frac {3\,a^2\,b\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{f} \]
(a^3*tan(e/2 + (f*x)/2))/(2*f) - (a^3*tan(e/2 + (f*x)/2)^2 + a^3 + 4*b^3*t an(e/2 + (f*x)/2))/(f*(2*tan(e/2 + (f*x)/2) + 2*tan(e/2 + (f*x)/2)^3)) + ( 6*a*b^2*atan((36*a^2*b^4)/(36*a^3*b^3 - 36*a^2*b^4*tan(e/2 + (f*x)/2)) + ( 36*a^3*b^3*tan(e/2 + (f*x)/2))/(36*a^3*b^3 - 36*a^2*b^4*tan(e/2 + (f*x)/2) )))/f + (3*a^2*b*log(tan(e/2 + (f*x)/2)))/f